#include <memory>
#include "TcpServer.hpp"
#include "Log.hpp"

using namespace LogModule;

int main(int argc, char* argv[])
{
    Enable_Console_Log_Strategy();
    if(argc != 2)
    {
        LOG(LogLevel::FATAL) << argv[0] << " port";
        exit(USERAGE_ERR);
    }
    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>(port);
    tsvr -> Init();
    tsvr -> Run();
    return 0;
}